<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@page isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>会议室管理</title>
    <link href="../../css/style.css" rel="stylesheet" type="text/css">
    <script language="javascript" src="../../js/util.js"></script>
    <SCRIPT language=JavaScript type=text/JavaScript>
        function queding()
        {
            var str = confirm("确定删除吗？");
            if(str == true)
            {
                alert("删除成功！");
            }
            else
            {
                alert("取消删除！");
            }


        }
    </SCRIPT>
    <style type="text/css">
        <!--
        .style1 {color: #000033}
        -->
    </style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form action="selectRoomName" method="post">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td height="25" align="center" valign="bottom" class="td06"> <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="2%" valign="middle" background="../../images/bg_03.gif">&nbsp;</td>
                    <td width="2%" valign="middle" background="../../images/bg_03.gif"><img src="../../images/main_28.gif" width="9" height="9" align="absmiddle"></td>
                    <td height="30" valign="middle" background="../../images/bg_03.gif"><div align="left"><font color="#FFFFFF">会议室管理</font></div></td>
                </tr>
            </table></td>
        </tr>
    </table>
    <br>
    <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="table01">
        <tr>
            <td colspan="2" class="td_02"><span class="td_title">会议室查询</span></td>
            <td class="td_02">&nbsp;</td>
            <td class="td_02">&nbsp;</td>
        </tr>
        <tr>
            <td width="10%" class="td_02">会议室名称</td>
            <%--οnclick="javascript:window.location.href='selectByName'”--%>
            <%--<form action="test01" method="post">
                <td width="40%" class="td_02"><input name="name" type="text" class="input" style="width:91% ">      </td>
                <td width="10%" class="td_02"><input name="Submit" type="submit" class="buttonface02" value="  查询  "></td>
            </form>--%>
            <td width="40%" class="td_02"><input name="name" type="text" class="input" style="width:91% ">      </td>
            <td width="10%" class="td_02"><input name="Submit" type="submit" class="buttonface02" value="  查询  ">

            <td class="td_02"><!--  <input name="textfield" type="text" class="input" style="width:91% ">--></td>
        </tr>
    </table>
</form>
<table width="95%"  border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td class="td_page">        <div align="right">
            <input name="Submit" type="button" class="buttonface02" value="添加会议室" onClick="javascript:windowOpen('${pageContext.request.contextPath}/html/meeting/AddRoom.jsp','','',600,300,'no','no','50','50')">
        </div></td>
    </tr>
</table>
<table width="95%"  border="0" cellpadding="0" cellspacing="0" class="table02" align="center">
    <tr>
        <td width="37%" align="right"><div align="left"></div></td>
        <c:choose>
            <c:when test="${rooms.pagenum==1}">
                <td width="63%" height="30" align="right"><img src="../../images/1.gif" width="4" height="5" align="absmiddle"> <a href="roomManage?pagenum=1">首页</a> 　 <img src="../../images/2-2.gif" width="3" height="5" align="absmiddle"> <a href="roomManage?pagenum=${rooms.pagenum+1}">下一页</a>　 <img src="../../images/3.gif" width="4" height="5" align="absmiddle"> <a href="roomManage?pagenum=${rooms.totalPages}">末页</a>　　共 ${rooms.totalPages} 页 ${rooms.totalRows} 条记录</td>
            </c:when>
            <c:when test="${rooms.pagenum==rooms.totalPages}">
                <td width="63%" height="30" align="right"><img src="../../images/1.gif" width="4" height="5" align="absmiddle"> <a href="roomManage?pagenum=1">首页</a> 　 <img src="../../images/2.gif" width="3" height="5" align="absmiddle"> <a href="roomManage?pagenum=${rooms.pagenum-1}">上一页</a>　 <img src="../../images/3.gif" width="4" height="5" align="absmiddle"> <a href="roomManage?pagenum=${rooms.totalPages}">末页</a>　　共 ${rooms.totalPages} 页 ${rooms.totalRows} 条记录</td>
            </c:when>
            <c:otherwise>
                <td width="63%" height="30" align="right"><img src="../../images/1.gif" width="4" height="5" align="absmiddle"> <a href="roomManage?pagenum=1">首页</a> 　 <img src="../../images/2.gif" width="3" height="5" align="absmiddle"> <a href="roomManage?pagenum=${rooms.pagenum-1}">上一页</a>　 <img src="../../images/2-2.gif" width="3" height="5" align="absmiddle"> <a href="roomManage?pagenum=${rooms.pagenum+1}">下一页</a>　 <img src="../../images/3.gif" width="4" height="5" align="absmiddle"> <a href="roomManage?pagenum=${rooms.totalPages}">末页</a>　　共 ${rooms.totalPages} 页 ${rooms.totalRows} 条记录</td>
            </c:otherwise>
        </c:choose>
    </tr>
</table>
<table width="95%" border="0" align="center" cellpadding="2" cellspacing="0" class="table01">
    <tr>
        <td class="td_top">会议室名称</td>
        <td class="td_top">会议室描述</td>
        <td width="15%" class="td_top">会议室照片</td>
        <td width="10%" class="td_top">修改</td>
        <td width="10%" class="td_top">删除</td>
    </tr>
    <c:forEach items="${rooms.datas}" var="room">
        <tr>
            <td class="td_02">${room.room_name}</td>
            <td class="td_02">${room.room_content}</td>
            <td class="td_02"><img src="../../images/article_common.gif" width="7" height="15"></td>
            <%--在新页面打开onClick="javascript:windowOpen('${pageContext.request.contextPath}/updateRoom?flag=1&&id=${room.id}','','',600,280,'','','')"--%>
            <td class="td_02"><a href="${pageContext.request.contextPath}/updateRoom?flag=1&&id=${room.id}" >修改</a></td>
            <td class="td_02"><a href="${pageContext.request.contextPath}/delectRoom?id=${room.id}">删除</a></td>
        </tr>
    </c:forEach>

</table>

</body>
</html>
